//
//  TestScrollViewWC.m
//  sandbox
//
//  Created by 杨岑 on 4/30/15.
//  Copyright (c) 2015 杨岑. All rights reserved.
//

#import "TestScrollViewWC.h"

@interface TestScrollViewWC ()
@end

@implementation TestScrollViewWC

- (void)windowDidLoad {
    [super windowDidLoad];
    
    NSImageView* imageView = [[NSImageView alloc] init];
    imageView.image = [NSImage imageNamed:@"bk.jpg"];
    imageView.imageScaling = NSImageScaleNone;
    imageView.frame = NSMakeRect(0, 0, imageView.image.size.width, imageView.image.size.height);
    
    NSView* contentView =
        //self.window.contentView
        self.rightView
    ;
    NSScrollView* scrollView = [[NSScrollView alloc] initWithFrame:contentView.bounds];
    scrollView.hasHorizontalScroller = YES;
    scrollView.hasVerticalScroller = YES;
    scrollView.borderType = NSNoBorder;
    scrollView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
    scrollView.backgroundColor = [NSColor grayColor];
    scrollView.documentView = imageView;
    
    [self.rightView addSubview:scrollView];
    //self.window.contentView = scrollView;
}

- (IBAction)test_click:(id)sender {
}

@end
